import React, { Component } from 'react'
import  Taro  from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './index.scss'

import Search from '../../comment/searchInpute'
import ActiveItemOne from '../../comment/activeItem' ;
import Line from '../../comment/upLine'

export default class Index extends Component {

  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }
  
  itemClick = (e)=>{
    console.log('谁点击了我')
    console.log(e)
    console.log('==========')
    Taro.navigateTo({url: '/pages/otherPages/activeDetails/index'})
  }


  render () {
    const objjArr = [{title:'零零1零零', username:'怕怕怕怕' ,date:'就将计就计'},
    {title:'零零2零零', username:'怕怕怕怕' ,date:'就将计就计'},{title:'零零5零零', username:'怕怕怕怕' ,date:'就将计就计'},
    {title:'零零3零零', username:'怕怕怕怕' ,date:'就将计就计'},{title:'零零6零零', username:'怕怕怕怕' ,date:'就将计就计'},
    {title:'零零4零零', username:'怕怕怕怕' ,date:'就将计就计'}]
    return (
      <View className='main'>
        <Line />
        <Search inputSetting={{placeholder:'请输入活动名称'}} />
        {
          objjArr.map((v,i)=>(<ActiveItemOne activeMsg={v} key={i+v.title} handleClick={this.itemClick} />))
        }
      </View>
    )
  }
}
